package org.baicaixiaozhan.learn.guava.base;

import com.google.common.base.Optional;
import com.google.common.reflect.Reflection;

/**
 * DESC: {@link Optional} 示例
 *
 * @author : baicaixiaozhan
 * @since : 2020-11-12
 */
public class OptionalDemo {

    public static void main(String[] args) {

        // Guava
        System.out.println(Optional.fromNullable(null).isPresent());

        // JDK
        System.out.println(java.util.Optional.ofNullable(null).isPresent());
    }
}
